﻿using AutoMapper;
using Production_Set.API.Application.Commands.Customerser;

using Production_Set.API.Application.Commands.Procurement;
using Production_Set.API.Application.Commands.Resourctes;
using THE_WIND_RISES.Common.Domans.BasicInformation.Materials;
using THE_WIND_RISES.Common.Domans.BasicInformation.warehouses;
using THE_WIND_RISES.Common.Domans.Produce.ManifestInfos;
using Production_Set.API.Application.Commands.Supplier;
using Production_Set.API.Application.Commands.Technology;
using Production_Set.API.Application.Commands.Warehousings;
using Production_Set.API.Application.Commands.WorkCenters;
using THE_WIND_RISES.Common.Domans.BasicInformation.warehouses;
using THE_WIND_RISES.Common.Domans.Produce.Craft;
using THE_WIND_RISES.Common.Domans.Produce.Customers;
using THE_WIND_RISES.Common.Domans.Produce.Order;
using THE_WIND_RISES.Common.Domans.Produce.Procurement;
using THE_WIND_RISES.Common.Domans.Produce.Resources;
using THE_WIND_RISES.Common.Domans.Produce.Supplier;
using THE_WIND_RISES.Common.Domans.Produce.WorkCenter_;
using THE_WIND_RISES.Common.Domans.Warehousing;
using THE_WIND_RISES.Common.Domans.Produce.DemandPlanning;
using Production_Set.API.MaterialManagement.Add;
using Production_Set.API.MaterialManagement.Update;
using Production_Set.API.Application.Commands.Orderers;
using THE_WIND_RISES.Common.Domans.OutboundOrder;

namespace Production_Set.API.Commons
{
    public class AutoMapperProfile : Profile
    {
        /// <summary>
        /// 映射
        /// </summary>
        public AutoMapperProfile()
        {

            //资源添加
            CreateMap<ResourceCreateCommend, Resource>();
            //资源修改
            CreateMap<ResourceUpdateCommend, Resource>();
            //物料管理
            CreateMap<MaterialCreateCommon, ItemInfo>();
            //物料清单
            CreateMap<BillMaterialCreateCommon, ItemManifestInfo > ();
            //工艺路线
            CreateMap<ProcessRouteCreateCommand, ProcessRoute>();
            //客户添加
            CreateMap<CustomerCreateCommend, Customer>();

            //客户修改
            CreateMap<CustomerUpdateCommend, Customer>();

            //销售订单添加
            CreateMap<OrdersCreateCommend, Orders>();
            //订单行
            CreateMap<OrderLineCreateCommend, OrderLine>();

            //销售订单修改
            CreateMap<ResourceUpdateCommend, Orders>();

            //供应商添加
            CreateMap<OrdersUpdateCommend, Orders>();
            //订单行修改
            CreateMap<OrderLineUpdateCommend, OrderLine>();
            //供应商添加
            CreateMap<SupplierCreateCommand, Suppliers>();
            //供应商修改
            CreateMap<SupplierUpdateCommand, Suppliers>();
            //联系人修改
            CreateMap<ContactPersonsUpdateCommand, ContactPersons>();
            //银行修改
            CreateMap<BanksUpdateCommand, Banks>();



            //采购/委外订单添加
            CreateMap<PurchasingsCreateCommand, Purchasings>();
            //采购/委外订单修改
            CreateMap<PurchasingsUpdateCommand, Purchasings>();
            //订单行添加
            CreateMap<OrderLinesAddCommend, OrderLines>();
            //订单行修改
            CreateMap<OrderLinesUpdateCommand, OrderLines>();
            //付款计划修改
            CreateMap<PaymentPlansCreateCommand, PaymentPlans>();
            //付款计划修改
            CreateMap<PaymentPlansUpdateCommand, PaymentPlans>();

            //物料需求计划添加
            CreateMap<MaterialPlanningCreateCommon, MaterialPlanning>();
            //物料需求计划修改
            CreateMap<MaterialPlanningUpdateCommon, MaterialPlanning>();
            //物料清单行
            CreateMap<RowBillMaterialCreateCommon, ItemManifestRow>();
            //物料需求行
            CreateMap<RowMaterialPlanningCreateCommon, MaterialPlanningRow>();
            //生产任务添加
            CreateMap<TasksCreateCommon, ProductionTasks>();
            //生产任务修改
            CreateMap<TasksUpdateCommon, ProductionTasks>();
            //工作中心
            CreateMap<WorkCenterAddCommand, WorkCenter>();
            //工作中心资源分配
            //CreateMap<WorkCenterWealthAddCommand, WorkCenterWealth>();

            //入库表添加
            CreateMap<StorageCreateCommend, Storage>();
            //入库表修改
            CreateMap<StorageUpdateCommend, Storage>();
            //入库订单行
            CreateMap<OrderTineCreateCommend, OrderTine>();
            //入库行修改
            CreateMap<OrderTineUpdateCommend, OrderTine>();
            //出库表添加
            CreateMap<OutBundCreateCommon, OutBound>();
            //出库表修改
            CreateMap<OutBoundUpdateCommon, OutBound>();
        }
    }
}
